import request from '@/utils/request'

// api地址
const api = {
  login: '/auth/oauth/token',
  logout: '/auth/token/logout'
}

// 用户登录
export const login = (data) => {
  return request.post(`${api.login}?username=${data.username}&password=${data.password}&randomStr=${data.randomStr}&grant_type=password&scope=server`, {}, { load: false })
}

// 退登
export function logout(data, option) {
  return request.delete(api.logout, data, option)
}


